<nz-tabset nzTabPosition="left" nzType="card">
  <!-- Json -->
  <nz-tab>
    <ng-template #nzTabHeading>
      Json
    </ng-template>
    <ngx-monaco-editor #editor [options]="editorOptions" [(ngModel)]="code"></ngx-monaco-editor>
  </nz-tab>

  <!-- Table -->
  <nz-tab>
    <ng-template #nzTabHeading>
      Table
    </ng-template>
    <div>
      <nz-table #nzTable [nzDataSource]="_data" [nzIsPagination]="false" nzSize="small">
        <thead nz-thead>
          <tr>
            <th nz-th nzWidth="50%">名称</th>
            <th nz-th nzWidth="20%">类型</th>
            <th nz-th>说明</th>
          </tr>
        </thead>
        <tbody nz-tbody>
          <ng-template ngFor let-row [ngForOf]="nzTable.data">
            <ng-template ngFor let-item [ngForOf]="expandDataCache[row.key]">
              <tr nz-tbody-tr *ngIf="(item.parent&&item.parent.expand)||!(item.parent)">
                <td nz-td>
                  <nz-row-indent [nzIndentSize]="item.level"></nz-row-indent>
                  <nz-row-expand-icon [(nzExpand)]="item.expand" (nzExpandChange)="collapse(expandDataCache[data.key],item,$event)" [nzShowExpand]="hasExpand(item)"></nz-row-expand-icon>
                  {{item.key}}
                </td>
                <td nz-td>{{item.type}}{{item.$ref}}{{item.items?.type}}{{item.items?.$ref}}</td>
                <td nz-td>{{item.description}}</td>
              </tr>
            </ng-template>
          </ng-template>
        </tbody>
      </nz-table>
    </div>
  </nz-tab>


</nz-tabset>